#include <stdio.h>
int diagonalSum(int** mat, int matSize, int* matColSize){
    int sum = 0;
    for(int i = 0; i < matSize; i++){
        sum += mat[i][i] + mat[i][matSize - 1 - i];
    }
    if(matSize % 2 == 1){
        sum -= mat[matSize / 2][matSize / 2];
    }
    return sum;
}
int main() {
    int mat1[3][3] = {{1,2,3}, {4,5,6}, {7,8,9}};
    int* mat1_ptr[3] = {mat1[0], mat1[1], mat1[2]};
    printf("%d\n", diagonalSum(mat1_ptr, 3, NULL)); // Output: 25
    return 0;
}